package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.pojo.domain.TraceHistory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TraceHistoryMapper;
import com.ruoyi.system.service.ITraceHistoryService;

/**
 * 追踪记录Service业务层处理
 * 
 * @author sxb
 * @date 2024-01-24
 */
@Service
public class TraceHistoryServiceImpl implements ITraceHistoryService 
{
    @Autowired
    private TraceHistoryMapper traceHistoryMapper;

    /**
     * 查询追踪记录
     * 
     * @param id 追踪记录主键
     * @return 追踪记录
     */
    @Override
    public TraceHistory selectTraceHistoryById(Long id)
    {
        return traceHistoryMapper.selectTraceHistoryById(id);
    }

    /**
     * 查询追踪记录列表
     * 
     * @param traceHistory 追踪记录
     * @return 追踪记录
     */
    @Override
    public List<TraceHistory> selectTraceHistoryList(TraceHistory traceHistory)
    {
        return traceHistoryMapper.selectTraceHistoryList(traceHistory);
    }

    /**
     * 新增追踪记录
     * 
     * @param traceHistory 追踪记录
     * @return 结果
     */
    @Override
    public int insertTraceHistory(TraceHistory traceHistory)
    {
        return traceHistoryMapper.insertTraceHistory(traceHistory);
    }

    /**
     * 修改追踪记录
     * 
     * @param traceHistory 追踪记录
     * @return 结果
     */
    @Override
    public int updateTraceHistory(TraceHistory traceHistory)
    {
        return traceHistoryMapper.updateTraceHistory(traceHistory);
    }

    /**
     * 批量删除追踪记录
     * 
     * @param ids 需要删除的追踪记录主键
     * @return 结果
     */
    @Override
    public int deleteTraceHistoryByIds(Long[] ids)
    {
        return traceHistoryMapper.deleteTraceHistoryByIds(ids);
    }

    /**
     * 删除追踪记录信息
     * 
     * @param id 追踪记录主键
     * @return 结果
     */
    @Override
    public int deleteTraceHistoryById(Long id)
    {
        return traceHistoryMapper.deleteTraceHistoryById(id);
    }

    @Override
    public List<TraceHistory> selectTraceHistoryByStudentId(String studentId) {
        Long LongStudentId = Long.valueOf(studentId);
        return traceHistoryMapper.selectTraceHistoryByStudentId(LongStudentId);
    }
}
